import {toast} from '@/utils/toast';
// const userinfo = localStorage.getItem('userinfo')
const state = {
	userinfo: {},
	isLogin: false,
	


}
const mutations = {
	LOGIN_INFO: (state, info) => {
		state.userinfo = info;
		state.isLogin = true;
		uni.setStorage({
			key: 'userinfo',
			data: info
		})
	},
	
	
	logout(state) { //退出登录 
		console.log(state)
		state.userinfo = {}
		state.isLogin = false;
		uni.removeStorageSync('userinfo');
	},
	
	
	
}
const actions = {

}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}
